<?php
if (isset($msgList))
    foreach ($msgList as $msg) {
        if ($msg->SendUserId == 0) { // 0代表发送方是管理员
            $tittleText1 = '管理员：';
            $tittleClass = 'app-main-color';
        } else {
            $tittleText1 = '用户：';
            $tittleClass = 'app-green-color';
        }
        ?>
        <div class="app-border-bottom">
            <div style="padding: 10px 12px 0px 12px">
                <b class="<?= $tittleClass ?>"><?= $tittleText1 ?></b>&nbsp;&nbsp;&nbsp;<?= $msg->MsgText ?>
            </div>
            <ul data-am-widget="gallery"
                class="am-gallery am-avg-sm-3 am-gallery-default"
                data-am-gallery="{pureview: 1}">
                <?php
                if (!empty($msg->MsgPic)) {
                    $imgList = explode(';', $msg->MsgPic);
                    foreach ($imgList as $img) {
                        $imgMini = make_img_name::make_img_mini_name($img);
                        ?>
                        <li>
                            <div class="am-gallery-item">
                                <img src="<?= $CfgPara->httproot ?>/message_pic/<?= $imgMini ?>"
                                     alt="" data-rel="<?= $CfgPara->httproot ?>/message_pic/<?= $img ?>"/>
                            </div>
                        </li>
                    <?php }
                } ?>
            </ul>
            <div class="app-gray-color am-text-xs" style="padding: 5px 12px">
                <?= $msg->MsgDt ?>
            </div>
        </div>
    <?php } ?>